package mst.service.impl;

import mst.dao.IStudentDao;
import mst.domain.Student;
import mst.service.IStudentService;

import java.sql.SQLException;
import java.util.List;

/**
 * @author 马松涛
 */
public class StudentServiceImpl implements IStudentService {
    private IStudentDao studentDao;

    public StudentServiceImpl(IStudentDao studentDao) {
        this.studentDao = studentDao;
    }

    @Override
    public List<Student> getStudents(Student student) throws SQLException {
        // 编写业务逻辑
        return studentDao.list(student);
    }

    @Override
    public int addStudent(Student student) {
        return 0;
    }

    @Override
    public int deleteStudent(int id) {
        return 0;
    }

    @Override
    public int updateStudent(Student student) {
        return 0;
    }

    @Override
    public Student getStudent(int id) {
        return null;
    }
}
